<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>  
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<title>电影详情</title>
<!-- for-mobile-apps -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false);
		function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- //for-mobile-apps -->
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
<!-- pop-up -->
<link href="css/popuo-box.css" rel="stylesheet" type="text/css" media="all" />
<!-- //pop-up -->
<link href="css/easy-responsive-tabs.css" rel='stylesheet' type='text/css'/>
<link rel="stylesheet" type="text/css" href="css/zoomslider.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link href="css/font-awesome.css" rel="stylesheet"> 
<script type="text/javascript" src="js/modernizr-2.6.2.min.js"></script>
<!--/web-fonts-->
<link href='http://fonts.googleapis.com/css?family=Tangerine:400,700' rel='stylesheet' type='text/css'>
<link href="http://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<!--//web-fonts-->
</head>
<body>
<!--/main-header-->
  <!--/banner-section-->
	<div id="demo-1" class="banner-inner">
	 <div class="banner-inner-dott">
		<!--/header-w3l-->
			   <div class="header-w3-agileits" id="home">
			     <div class="inner-header-agile part2">	
				<nav class="navbar navbar-default">
					<div class="navbar-header">
						<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
							<span class="sr-only">Toggle navigation</span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
						</button>
						<h1><a  href="index.html"><span>M</span>ovies <span>P</span>ro</a></h1>
					</div>
					<!-- navbar-header -->
					<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
							<ul class="nav navbar-nav">
							<li><a href="/index">首页</a></li>
							<li class="active"><a href="/moviedetail">电影</a></li>
								<li><a href="/userInfo">个人中心</a></li>

							</ul>

					</div>
					<div class="clearfix"> </div>	
				</nav>
					<div class="w3ls_search">
									<div class="cd-main-header">
										<ul class="cd-header-buttons">
											<li><a class="cd-search-trigger" href="#cd-search"> <span></span></a></li>
										</ul> <!-- cd-header-buttons -->
									</div>
									<div id="cd-search" class="cd-search">
										<form action="#" method="post">
											<input name="Search" type="search" placeholder="Search...">
										</form>
									</div>
								</div>
	
			</div> 

			   </div>
		<!--//header-w3l-->
		</div>
    </div>
  <!--/banner-section-->
 <!--//main-header-->
	         <!--/banner-bottom-->
			  <div class="w3_agilits_banner_bootm">
			     <div class="w3_agilits_inner_bottom">
			            <div class="col-md-6 wthree_agile_login">
						     <ul>
									<li><i class="fa fa-phone" aria-hidden="true"></i> (+000) 009 455 4088</li>
									<c:if test="${dbuser==null }">
									<li><a href="#" class="login"  data-toggle="modal" data-target="#myModal4">登录</a></li>
									<li><a href="#" class="login reg"  data-toggle="modal" data-target="#myModal5">注册</a></li>
									</c:if>
									<c:if test="${dbuser!=null }">
										<li><a href="#" class="login">欢迎用户：${dbuser.name }</a></li>
										<li><a href="/logout" class="login">注销</a></li>
									</c:if>
								</ul>
						</div>
						
				</div>
			</div>
			<!--//banner-bottom-->
		    <%@include file="loginAndRegModal.jsp" %>
						<!-- breadcrumb -->
	<div class="w3_breadcrumb">
	<div class="breadcrumb-inner">	
			<ul>
				<li><a href="index.html">首页</a><i>//</i></li>
				
				<li>电影详情</li>
			</ul>
		</div>
	</div>
<!-- //breadcrumb -->
			<!--/content-inner-section-->
				<div class="w3_content_agilleinfo_inner">
						<div class="agile_featured_movies">
				           
							   <div class="latest-news-agile-info">
								   <div class="col-md-8 latest-news-agile-left-content">
											<div class="single video_agile_player">
											       
										            <div class="video-grid-single-page-agileits">
														<div data-video="f2Z65fobH2I" id="video"> <img src="${movie.mimg }" alt="" class="img-responsive"style="max-height:600px;max-width: 900px; vertical-align:middle;" /> 
															
														</div>
													</div>
													
													 
										    </div>
											
										
										<div class="response">
							<h4>剧情简介：</h4>
							<ul class="side-bar-agile">
										   <li>${movie.introduce }</li>
											
										</ul>
				
							<h4>评论：<c:out value="${currentTime}"/></h4>
							<c:forEach items="${mevalutes }" var="mevalute">
							<div class="media response-info">
								<div class="media-left response-text-left">
									<a href="#">
										<img class="media-object" src="${mevalute.meimg }" alt="" style="max-height:100px;max-width: 100px; vertical-align:middle;">
									</a>
									<h5><a href="#">${mevalute.mename }</a></h5>
								</div>
								<div class="media-body response-text-right">
									<p>${mevalute.mebody }</p>
									<ul>
										<li>${mevalute.metime}</li>
										<li><a href="#"><i class="fa fa-reply" aria-hidden="true" ></i> <input type="submit"  onclick="xianshimodal(${mevalute.meId },${mevalute.memovieId })" value="回复"></a></li>
									</ul>
									<c:forEach items="${relpies }" var="reply">
									<c:if test="${mevalute.meId==reply.remeId }">
									<div class="media response-info">
										<div class="media-left response-text-left">
											<a href="#">
												<img class="media-object" src="${reply.reimg }" alt="" style="max-height:100px;max-width: 100px; vertical-align:middle;">
											</a>
											<h5><a href="#">${reply.name }</a></h5>
										</div>
										<div class="media-body response-text-right">
											<p>${reply.rebody }</p>
											<ul>
												<li>${reply.retime }</li>
												<li><a href="#"><i class="fa fa-reply" aria-hidden="true"></i> 回复</a>${mevalute.mename }</li>
											</ul>		
										</div>
										<div class="clearfix"> </div>
									</div>
									</c:if>
									</c:forEach>
								</div>
								<div class="clearfix"> </div>
							</div>
							
							</c:forEach>
							 <%@include file="replymodal.jsp" %>
						</div>
						
											<div class="all-comments-info">
												 <h5 >留下评论</h5>
												<div class="agile-info-wthree-box">
													<form name="fasong">
													   
													   <div class="col-md-6 form-info">
														
														<textarea name="mebody" placeholder="留言..." required=""></textarea>
																</form>
														<input type="hidden" name="mename" value="${dbuser.name }"> 
														<input type="hidden" name="meimg" value="${dbuser.spare }"> 
														<input type="hidden" name="memovieId" value="${movie.movieId}"> 
														<c:if test="${dbuser!=null }">
														<input type="submit" value="发送" onclick="send()" >
														</c:if>
														<c:if test="${dbuser==null }">
														<input type="submit"  data-toggle="modal" data-target="#myModal4" value="发送">
														</c:if>
														
													 </div>
													 <div class="clearfix"> </div>
														<script type="text/javascript">
															function send(){
																var mebody=fasong.mebody.value;
																var mename=fasong.mename.value;
																var meimg=fasong.meimg.value;
																var memovieId=fasong.memovieId.value;
														       	var date = new Date();
														        var seperator1 = "-";
														        var year = date.getFullYear();
														        var month = date.getMonth() + 1;
														        var strDate = date.getDate();
														        var hour=date.getHours();
														        var kong=" ";
														        var fenhao=":";
														        var minutes=date.getMinutes();
														        if (month >= 1 && month <= 9) {
														            month = "0" + month;
														        }
														        if (strDate >= 0 && strDate <= 9) {
														            strDate = "0" + strDate;
														        }
														        if (minutes >= 0 && minutes <= 9) {
														        	minutes = "0" + minutes;
														        }
														        var metime = year + seperator1 + month + seperator1 + strDate +kong+hour+fenhao+minutes;
														        $.post("/fasongxinxi",{memovieId:memovieId,mename:mename,metime:metime,mebody:mebody,meimg:meimg},
																		function(result){
														        	window.location.href="/moviedetail?movieId="+result.movieId;
																		});
															}
														</script>
														
											
												</div>
											</div>
								   </div>
								   <div class="col-md-4 latest-news-agile-right-content">
								   <h4 class="side-t-w3l-agile">最近的电影</h4>
										<div class="side-bar-form">
										 <form action="#" method="post">
											<input type="search" name="email" placeholder="搜索...." required="required">
											<input type="submit" value=" ">
										 </form>
									    </div>
								      <h4 class="side-t-w3l-agile">影片详情</h4>
									    <ul class="side-bar-agile">
										   <li><h4>电影名称：${movie.mname }</h4></li>
											<li><h4>电影类型：${movie.mtype }</h4></li>
											<li><h4>导演：${movie.director }</h4></li>
											<li><h4>演员：${movie.actor }</h4></li>
											<li><h4>电影时长：${movie.time }</h4></li>
											<li><h4>上映时间：${movie.releasetime }</h4></li>				 
										   <a href="cinemaList?movieId=${movie.movieId }" class="btn btn-danger">购票</a>
										</ul>
										<h4 class="side-t-w3l-agile">最想看的电影</h4>
										<c:forEach items="${see }" var="se" begin="0" end="0" step="1">
											<a href="/moviedetail?movieId=${sc.movieId }">
										<div class="video_agile_player sidebar-player">
									
										            <div class="video-grid-single-page-agileits">
														<div data-video="fNKUgX8PhMA" id="video1"> <img src="${se.mimg }" alt="" class="img-responsive" style="max-height:400px;max-width: 600px; vertical-align:middle;"> <div id="play"></div></div>
													</div>


										        <div class="player-text side-bar-info">
												<p class="fexi_header">${se.mname }</p>
												<p class="fexi_header_para"><span class="conjuring_w3">电影简介<label>:</label></span>${se.introduce }</p>
												<p class="fexi_header_para"><span>上映时间<label>:</label></span>${se.releasetime } </p>
												<p class="fexi_header_para">
													<span>类别<label>:</label> </span>
													${se.mtype }					
												</p>
												<p class="fexi_header_para fexi_header_para1"><span>评分<label>:</label></span>
													<a href="#"><i class="fa fa-star" aria-hidden="true"></i></a>
													<a href="#"><i class="fa fa-star" aria-hidden="true"></i></a>
													<a href="#"><i class="fa fa-star-half-o" aria-hidden="true"></i></a>
													<a href="#"><i class="fa fa-star-o" aria-hidden="true"></i></a>
													<a href="#"><i class="fa fa-star-o" aria-hidden="true"></i></a>
												</p>
											</div>
										
										    </div>
										    </a>
										    </c:forEach>
											<div class="clearfix"> </div>
											<div class="agile-info-recent">
											<h4 class="side-t-w3l-agile">高评分电影</span></h4>
											<div class="w3ls-recent-grids">
											<c:forEach items="${score }" var="sc" begin="0" end="2" step="1">
												<div class="w3l-recent-grid">
													<div class="wom">
														<a href="/moviedetail?movieId=${sc.movieId }"><img src="${sc.mimg }" alt=" " class="img-responsive"></a>
													</div>
													<div class="wom-right">
														<h5><a href="single.html">${sc.mname }</a></h5>
														<p>${sc.introduce }</p>
															<ul class="w3l-sider-list">
																<li><i class="fa fa-clock-o" aria-hidden="true"></i>${sc.time }</li>
																<li><i class="fa fa-eye" aria-hidden="true"></i> ${sc.releasetime }</li>
															</ul>
													</div>
													<div class="clearfix"> </div>
												</div>
												</c:forEach>
										
											</div>
										</div>
										
							       </div>
								   <div class="clearfix"></div>
							   </div>
					
						</div>
				</div>
			<!--//content-inner-section-->

 <%@include file="footer.jsp" %>
	